3.1.93 \(\int (\frac {x^2}{\cos ^{\frac {3}{2}}(x)}+x^2 \sqrt {\cos (x)}) \, dx\) [93]

Optimal. Leaf size=32 \[ 8 x \sqrt {\cos (x)}-16 E\left (\left .\frac {x}{2}\right |2\right )+\frac {2 x^2 \sin (x)}{\sqrt {\cos (x)}} \]

[Out]

-16*(cos(1/2*x)^2)^(1/2)/cos(1/2*x)*EllipticE(sin(1/2*x),2^(1/2))+2*x^2*sin(x)/cos(x)^(1/2)+8*x*cos(x)^(1/2)

________________________________________________________________________________________

Rubi [A]
time = 0.06, antiderivative size = 32, normalized size of antiderivative = 1.00, number of steps used = 3, number of rules used = 2, integrand size = 21, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.095, Rules used = {3397, 2719} \begin {gather*} \frac {2 x^2 \sin (x)}{\sqrt {\cos (x)}}+8 x \sqrt {\cos (x)}-16 E\left (\left .\frac {x}{2}\right |2\right ) \end {gather*}

Antiderivative was successfully verified.

[In]

Int[x^2/Cos[x]^(3/2) + x^2*Sqrt[Cos[x]],x]

[Out]

8*x*Sqrt[Cos[x]] - 16*EllipticE[x/2, 2] + (2*x^2*Sin[x])/Sqrt[Cos[x]]

Rule 2719

Int[Sqrt[sin[(c_.) + (d_.)*(x_)]], x_Symbol] :> Simp[(2/d)*EllipticE[(1/2)*(c - Pi/2 + d*x), 2], x] /; FreeQ[{
c, d}, x]

Rule 3397

Int[((c_.) + (d_.)*(x_))^(m_.)*((b_.)*sin[(e_.) + (f_.)*(x_)])^(n_), x_Symbol] :> Simp[(c + d*x)^m*Cos[e + f*x
]*((b*Sin[e + f*x])^(n + 1)/(b*f*(n + 1))), x] + (Dist[(n + 2)/(b^2*(n + 1)), Int[(c + d*x)^m*(b*Sin[e + f*x])
^(n + 2), x], x] + Dist[d^2*m*((m - 1)/(b^2*f^2*(n + 1)*(n + 2))), Int[(c + d*x)^(m - 2)*(b*Sin[e + f*x])^(n +
 2), x], x] - Simp[d*m*(c + d*x)^(m - 1)*((b*Sin[e + f*x])^(n + 2)/(b^2*f^2*(n + 1)*(n + 2))), x]) /; FreeQ[{b
, c, d, e, f}, x] && LtQ[n, -1] && NeQ[n, -2] && GtQ[m, 1]

Rubi steps

\begin {align*} \int \left (\frac {x^2}{\cos ^{\frac {3}{2}}(x)}+x^2 \sqrt {\cos (x)}\right ) \, dx &=\int \frac {x^2}{\cos ^{\frac {3}{2}}(x)} \, dx+\int x^2 \sqrt {\cos (x)} \, dx\\ &=8 x \sqrt {\cos (x)}+\frac {2 x^2 \sin (x)}{\sqrt {\cos (x)}}-8 \int \sqrt {\cos (x)} \, dx\\ &=8 x \sqrt {\cos (x)}-16 E\left (\left .\frac {x}{2}\right |2\right )+\frac {2 x^2 \sin (x)}{\sqrt {\cos (x)}}\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]
time = 0.09, size = 29, normalized size = 0.91 \begin {gather*} 2 \left (-8 E\left (\left .\frac {x}{2}\right |2\right )+\frac {x (4 \cos (x)+x \sin (x))}{\sqrt {\cos (x)}}\right ) \end {gather*}

Antiderivative was successfully verified.

[In]

Integrate[x^2/Cos[x]^(3/2) + x^2*Sqrt[Cos[x]],x]

[Out]

2*(-8*EllipticE[x/2, 2] + (x*(4*Cos[x] + x*Sin[x]))/Sqrt[Cos[x]])

________________________________________________________________________________________

Maple [F]
time = 0.20, size = 0, normalized size = 0.00 \[\int \frac {x^{2}}{\cos \left (x \right )^{\frac {3}{2}}}+x^{2} \left (\sqrt {\cos }\left (x \right )\right )\, dx\]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(x^2/cos(x)^(3/2)+x^2*cos(x)^(1/2),x)

[Out]

int(x^2/cos(x)^(3/2)+x^2*cos(x)^(1/2),x)

________________________________________________________________________________________

Maxima [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Failed to integrate} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(x^2/cos(x)^(3/2)+x^2*cos(x)^(1/2),x, algorithm="maxima")

[Out]

integrate(x^2*sqrt(cos(x)) + x^2/cos(x)^(3/2), x)

________________________________________________________________________________________

Fricas [F(-2)]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Exception raised: TypeError} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(x^2/cos(x)^(3/2)+x^2*cos(x)^(1/2),x, algorithm="fricas")

[Out]

Exception raised: TypeError >>  Error detected within library code:   integrate: implementation incomplete (ha
s polynomial part)

________________________________________________________________________________________

Sympy [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \int \frac {x^{2} \left (\cos ^{2}{\left (x \right )} + 1\right )}{\cos ^{\frac {3}{2}}{\left (x \right )}}\, dx \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(x**2/cos(x)**(3/2)+x**2*cos(x)**(1/2),x)

[Out]

Integral(x**2*(cos(x)**2 + 1)/cos(x)**(3/2), x)

________________________________________________________________________________________

Giac [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {could not integrate} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(x^2/cos(x)^(3/2)+x^2*cos(x)^(1/2),x, algorithm="giac")

[Out]

integrate(x^2*sqrt(cos(x)) + x^2/cos(x)^(3/2), x)

________________________________________________________________________________________

Mupad [F]
time = 0.00, size = -1, normalized size = -0.03 \begin {gather*} \int x^2\,\sqrt {\cos \left (x\right )}+\frac {x^2}{{\cos \left (x\right )}^{3/2}} \,d x \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(x^2*cos(x)^(1/2) + x^2/cos(x)^(3/2),x)

[Out]

int(x^2*cos(x)^(1/2) + x^2/cos(x)^(3/2), x)

________________________________________________________________________________________